﻿namespace GreenIsomer.Data.Entities.Ddl {
	using System;
	using System.Xml.Serialization;

	[Serializable, XmlType("NumericColumn", Namespace = Settings.Namespace)]
	public class NumericColumn : Column {

		public NumericColumn() { }

		public override void WriteScript(DdlWriter writer, Value value) {
			decimal result;
			if(decimal.TryParse(value.Text, out result)) writer.Write(result);
			else writer.WriteNull();
		}

	}

}